home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 49 / Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso / -serious- / comms / other / amigancp_21 / amigancp.lha / AmigaNCP_21 / Install-AmigaNCP < prev    next >
Text File  |  1999-11-13  |  6KB  |  260 lines

  1. ; Installer-Script for AmigaNCP
  2. ;
  3. ; $VER: AmigaNCP-Install 1.3 (25.04.99)
  4. ;
  5.  
  6. ;
  7. ; Strings
  8.  
  9. (set #startup-msg
  10. (cat    "\nWelcome to AmigaNCP Release 2.0\n===============================\n\n"
  11.         "© 1993-99 Oliver Wagner\n<owagner@vapor.com>\nAll Rights Reserved\n\n"
  12.         "Internet support:\n"
  13.         "http://www.vapor.com/\n"
  14.         "ftp: ftp.vapor.com, /pub/amigancp/"
  15. ))
  16.  
  17. (set #install-msg
  18. (cat    "Installing AmigaNCP Release 2.0\n\n"
  19.         "Where do you want AmigaNCP be installed?\nA drawer named"
  20.         "'AmigaNCP' will be automatically created."
  21. ))
  22.  
  23. (set #copylib-msg "Installing amigancp.library")
  24. (set #copylib-where "Please select a directory for \"amigancp.library\".")
  25. (set #copycat-msg "Installing catalogs")
  26. (set #copycat-where "Please select a directory for the language catalogs.")
  27. (set #copyserv-msg "Installing NCP Services")
  28. (set #copydoc-msg "Installing Docs")
  29. (set #copytools-msg "Installing Tools")
  30. (set #copyreg-msg "Installing Registration Utility")
  31. (set #copyicons-msg "Installing Default Icon Tree")
  32. (set #copysub-msg "Installing Submission Material")
  33.  
  34. (set #wantdev-msg 
  35. (cat    "Do you want to install the Developer\n"
  36.         "Documentation and associated support files?\n\n"
  37.         "These files are needed only when you want\n"
  38.         "to develop applications using \"amigancp.library\"\n"
  39.         "or want to do a catalog translation to another\n"
  40.         "language.\n"
  41. ))
  42. (set #copydev-msg "Copying Developer files")
  43. (set #whats "What Psion computer do you own?\n\nThis choice will determine the baud rate used\nto access the serial port")
  44. (set #need20 "AmigaNCP requires OS 2.04 or better!" )
  45.  
  46. (set #setpatchold "WARNING!\n========\nYour SetPatch Version %ld.%ld is TOO OLD!\n\nYou MUST at least have version 40.16 installed\nfor AmigaNCP to work properly, otherwise you\nwill experience crashes and memory losses!\n\nThe current version of SetPatch is included on the AmigaNCP registration disk or available from the Vapor support sites.")
  47.  
  48. ;
  49. ; Determine if running on an 68020++
  50. ;
  51. (procedure checkv20
  52.     (if (>= (database "cpu") 68020 )
  53.         (set v20-flag 1)
  54.     )
  55. )
  56.  
  57. ;
  58. ; Check for SetPatch 40.16 or higher
  59. ;
  60.  
  61. (procedure verifysetpatch
  62. (
  63. (set vernum1 (getversion "c:setpatch")) (set ver1 (/ vernum1 65536)) 
  64. (set rev1 (- vernum1 (* ver1 65536) ) ) (set setpatchver (cat ver1 "." rev1))
  65. (if (< setpatchVer current_setpatch) (message #updatesetpatch) )
  66.  
  67.     (set vernum (getversion "C:SetPatch"))
  68.     (set ver (/ vernum 65536 ) )
  69.     (set rev (- vernum (* ver 65536 ) ) )
  70.     (set setpatchver (cat ver "." rev))
  71.     (set current_setpatch "40.16")
  72.     (if (< setpatchver current_setpatch) 
  73.         (message (#setpatchold ver rev ) )
  74.         (set setpatchok 1)
  75.     )
  76. ))
  77. ;
  78. ;
  79. ; GO!
  80. ;
  81. ;
  82. (set vernum (getversion "LIBS:version.library"))
  83. (set ver (/ vernum 65536 ) )
  84. (set rev (- vernum (* ver 65536 ) ) )
  85.  
  86. (if (< ver 37 )
  87. (
  88.     (abort #need20)
  89. ))
  90. (set olduserlevel (user 1))
  91. (message #startup-msg)
  92. (user olduserlevel)
  93. (welcome)
  94. (set default-dest
  95.     (askdir
  96.         (prompt #install-msg)
  97.         (help @askdir-help)
  98.         (default @default-dest)
  99.     )
  100. )
  101. (complete 1)
  102. (set @default-dest
  103.     (tackon default-dest "AmigaNCP")
  104. )
  105. (complete 2)
  106. (set olduserlevel (user 1))
  107. (verifysetpatch)
  108. (user olduserlevel)
  109. (complete 3)
  110. (makedir @default-dest (infos))
  111. (makedir (tackon @default-dest "Docs" ) (infos))
  112. (makedir (tackon @default-dest "Tools" ) (infos))
  113. (makedir (tackon @default-dest "Submissions" ) (infos))
  114. (makedir (tackon @default-dest "Registration" ) (infos))
  115. (makedir (tackon @default-dest "Icons" ))
  116. (complete 2)
  117. ;
  118. ; Copy lib
  119. ;
  120. (set #libname "libs/amigancp.library")
  121. (checkv20)
  122. (if v20-flag
  123. (
  124.     (set #libname "libs/amigancp.library.020")
  125. ))
  126. (copyfiles
  127.     (help @copyfiles-help)
  128.     (prompt #copylib-msg)
  129.     (confirm)
  130.     (source #libname)
  131.     (newname "amigancp.library")
  132.     (dest
  133.         (askdir
  134.             (prompt #copylib-where)
  135.             (help @askdir-help)
  136.             (default "LIBS:")
  137.         )
  138.     )
  139. )
  140. (complete 10)
  141. (if (> ver 37 )
  142. (
  143.     (copyfiles
  144.         (source "Catalogs")
  145.         (prompt #copycat-msg)
  146.         (help @copyfiles-help)
  147.         (dest "LOCALE:Catalogs")
  148.         (confirm)
  149.         (all)
  150.     )
  151. ))
  152. (complete 20)
  153. (copyfiles
  154.     (source "")
  155.     (pattern "AmigaNCP#?")
  156.     (prompt #copyserv-msg)
  157.     (help @copyfiles-help)
  158.     (confirm)
  159.     (infos)
  160.     (dest @default-dest)
  161. )
  162. (complete 34)
  163. (copyfiles
  164.     (source "Icons")
  165.     (prompt #copyicons-msg)
  166.     (help @copyfiles-help)
  167.     (dest (tackon @default-dest "Icons" ) )
  168.     (all)
  169.     (infos)
  170. )
  171. (complete 36)
  172. (copyfiles
  173.     (source "Submissions")
  174.     (prompt #copysub-msg)
  175.     (help @copyfiles-help)
  176.     (dest (tackon @default-dest "Submissions" ) )
  177.     (all)
  178.     (infos)
  179. )
  180. (complete 38)
  181. (delete (tackon @default-dest "Icons.info" ))
  182. (complete 39)
  183. (foreach "" "AmigaNCP#?"
  184.     (tooltype (
  185.         (dest (tackon @default-dest @each-name ) )
  186.         (noposition)
  187.     )
  188. ))
  189. (complete 40)
  190. (copyfiles
  191.     (source "Docs")
  192.     (prompt #copydoc-msg)
  193.     (help @copyfiles-help)
  194.     (confirm)
  195.     (infos)
  196.     (all)
  197.     (dest (tackon @default-dest "Docs" ) )
  198. )
  199. (complete 60)
  200. (copyfiles
  201.     (source "Tools")
  202.     (prompt #copytools-msg)
  203.     (help @copyfiles-help)
  204.     (confirm)
  205.     (infos)
  206.     (all)
  207.     (dest (tackon @default-dest "Tools" ) )
  208. )
  209. (complete 70)
  210. (copyfiles
  211.     (source "Registration")
  212.     (prompt #copyreg-msg)
  213.     (help @copyfiles-help)
  214.     (confirm)
  215.     (infos)
  216.     (all)
  217.     (dest (tackon @default-dest "Registration" ) )
  218. )
  219. (complete 78)
  220. (copyfiles
  221.     (help @copyfiles-help)
  222.     (prompt #copylib-msg)
  223.     (source "Registration/vapor_registration.library")
  224.     (dest "LIBS:")
  225. )
  226. (complete 79)
  227. (copyfiles
  228.     (help @copyfiles-help)
  229.     (prompt #copylib-msg)
  230.     (source "Libs/vapor_toolkit.library")
  231.     (dest "LIBS:")
  232. )
  233. (complete 80)
  234. (if (askbool
  235.         (prompt #wantdev-msg)
  236.         (help #wantdev-msg)
  237.         (default 1)
  238.     )
  239. (
  240.     (set devdir (tackon @default-dest "Developer"))
  241.     (makedir devdir (infos))
  242.     (copyfiles
  243.         (source "Developer")
  244.         (prompt #copydev-msg)
  245.         (help @copyfiles-help)
  246.         (dest devdir)
  247.         (confirm)
  248.         (infos)
  249.         (all)
  250.     )
  251. ))
  252. (complete 90)
  253. (if ( = (exists "ENV:AmigaNCP.config") 0 )
  254. (
  255.     (run (tackon @default-dest "AmigaNCP-Prefs" ) )
  256. ))
  257. (complete 100)
  258.